#include <stdio.h>

#define MAX_N	100

int seq[MAX_N]; 
int nr=0;
int total=0; 

int n, k; 
int res=0; 

int append(int v)
{
	seq[nr] = v; 
	nr ++; 
	total += v; 
}

void pop(void)
{
	total -= seq[nr-1]; 
	nr--; 
}

void show(void)
{
	int i; 
	for (i=0; i<nr; i++) {
		printf("%d ", seq[i]); 
	}
	printf("\n"); 
}
	
void count(void)
{
	//show(); 
	res++; 
}

int dfs(int lvl)
{
	int r, i, start, last, left; 
	
	if (lvl>=k-1) {
		last = n - total; 
		if (last < seq[nr-1]) {
			return -1; 
		}
		append(last); 
		count(); 
		pop(); 
		return 0; 
	}
	left = n - total;
	start = lvl==0 ? 1 : seq[nr-1]; 
	for (i=start; i<left+1; i++) {
		append(i); 
		r = dfs(lvl+1); 
		pop(); 
		if (r<0) 
			break; 
	}
	return 0; 
}

int main()
{
	scanf("%d %d", &n, &k); 
	dfs(0); 
	printf("%d\n", res); 
	return 0; 
}

